package tech.xs.common.framework.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import tech.xs.common.util.structure.Tree;

import java.util.Collection;

@Getter
@Setter
@ToString
public class TreeEntity<T> extends BaseEntity implements Tree<T> {

    private String code;

    private String fatherCode;

    @TableField(exist = false)
    private T father;

    @TableField(exist = false)
    private Collection<T> children;

}
